package u1project.common;
import java.io.Serializable;
import java.util.HashMap;

/**
 * @author oldliu
 * @since 1.0
 */
//服务器给出的响应，包括是否成功，包含的数据
public class Response extends HashMap<String,Object> implements Serializable {
    private boolean success;//是否成功
    private String msg;//原因
    public Response(){

    }
    public Response(boolean success) {
        this.success = success;
    }
    public Response(boolean success, String msg) {
        this.success = success;
        this.msg = msg;
    }

    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    @Override
    public String toString() {
        return "Response{" +
                "success=" + success +
                ", msg='" + msg + '\''+',' +super.toString()+
                '}';
    }
}
